﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:ut="clr-namespace:UT3Bots.Visualizer.Controls"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	Width="Auto" Height="Auto"
	x:Class="UT3Bots.Visualizer.Controls.UTUIMap">

	<UserControl.Resources>

		<Storyboard x:Name="FullscreenIn">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FSButtonInner" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1.9"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FSButtonInner" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="5.417"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FSButtonInner" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1.856"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FSButtonInner" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="3.333"/>
			</DoubleAnimationUsingKeyFrames>
			<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FSButtonOuter" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)" Duration="00:00:00.0010000">
				<SplineColorKeyFrame KeyTime="00:00:00" Value="#FFFFFFFF"/>
			</ColorAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Name="FullscreenOut">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FSButtonInner" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FSButtonInner" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FSButtonInner" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FSButtonInner" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FSButtonOuter" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)" Duration="00:00:00.0010000">
				<SplineColorKeyFrame KeyTime="00:00:00" Value="#FF969696"/>
			</ColorAnimationUsingKeyFrames>
		</Storyboard>

	</UserControl.Resources>
	
	<Grid Name="RootLayout">
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="*"/>
			<ColumnDefinition Width="10"/>
		</Grid.ColumnDefinitions>
		<Grid.RowDefinitions>
			<RowDefinition Height="55"/>
			<RowDefinition Height="*"/>
		</Grid.RowDefinitions>
		
		<ScrollViewer Name="scrMap"  Grid.Row="1" Grid.Column="0" BorderBrush="Transparent" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
			<Grid Name="gridMap" RenderTransformOrigin="0,0">
				<Grid.RenderTransform>
					<ScaleTransform Name="transMapScale" ScaleX="1" ScaleY="1"/>
				</Grid.RenderTransform>
				<Image Name="imgMapImage" Stretch="None" HorizontalAlignment="Left" VerticalAlignment="Top" />
				<Canvas Name="cvsNavPoints" HorizontalAlignment="Left" VerticalAlignment="Top"></Canvas>
				<Canvas Name="cvsItemPoints" HorizontalAlignment="Left" VerticalAlignment="Top"></Canvas>
				<Canvas Name="cvsBots" HorizontalAlignment="Left" VerticalAlignment="Top"></Canvas>
			</Grid>
		</ScrollViewer>
		
		<Grid Grid.Row="0" Grid.Column="0">
			<TextBlock Name="txtMapName" Text="Map Name" FontSize="20" Foreground="#FFFFFFFF" FontFamily="Verdana" VerticalAlignment="Center"/>
			<Grid Height="45" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,210,0" Width="350" Background="#606060">
				<Rectangle Margin="0,0,0,0" Stroke="#FF969696" RadiusY="7" RadiusX="7" StrokeThickness="2"/>
				<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Text="Scores" TextWrapping="Wrap" Foreground="#FFFFFFFF" FontFamily="Verdana" FontSize="14" Margin="5,0,-0.2,0"/>
				<ut:UTUIScoreControl Name="scoreControl" Margin="20,0,20,5" HorizontalAlignment="Stretch" VerticalAlignment="Bottom"/>
			</Grid>
			<Grid Height="45" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,55,0" Width="150" Background="#606060">
				<Rectangle Margin="0,0,0,0" Stroke="#FF969696" RadiusY="7" RadiusX="7" StrokeThickness="2"/>
				<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Text="Zoom" TextWrapping="NoWrap" Foreground="#FFFFFFFF" FontFamily="Verdana" FontSize="14" Margin="5,0,-0.2,0"/>
				<Slider Name="sliderZoom" Style="{StaticResource UT3SliderStyle}" Margin="20,0,20,5" HorizontalAlignment="Stretch" Minimum="1" Maximum="5" Value="1" SmallChange="1" LargeChange="1" VerticalAlignment="Bottom" ValueChanged="Slider_ValueChanged" />
			</Grid>
			<Grid Height="45" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,0,0" Width="50" Background="#606060">
				<Rectangle Margin="0,0,0,0" Stroke="#00000000" RadiusY="7" RadiusX="7" StrokeThickness="2"/>
				<Grid Height="25" RenderTransformOrigin="0.5,0.5" Width="25" x:Name="FSButton" MouseEnter="FSButton_MouseEnter" MouseLeave="FSButton_MouseLeave" MouseLeftButtonDown="FSButton_MouseLeftButtonDown">
					<Grid.RenderTransform>
						<ScaleTransform ScaleX="2" ScaleY="2"/>
					</Grid.RenderTransform>
					<Rectangle Stroke="#FFFFFFFF" RadiusX="2" RadiusY="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0,3.91599988937378,0,4.5" x:Name="FSButtonOuter">
						<Rectangle.Fill>
							<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
								<GradientStop Color="#FF484848"/>
								<GradientStop Color="#FF959595" Offset="1"/>
							</LinearGradientBrush>
						</Rectangle.Fill>
					</Rectangle>
					<Rectangle Fill="#FFBDBDBD" RadiusX="2" RadiusY="2" Margin="0.957000017166138,4.91599988937378,12.0010004043579,12.2919998168945" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" RenderTransformOrigin="0.5,0.5" x:Name="FSButtonInner">
						<Rectangle.RenderTransform>
							<TransformGroup>
								<ScaleTransform/>
								<SkewTransform/>
								<RotateTransform/>
								<TranslateTransform/>
							</TransformGroup>
						</Rectangle.RenderTransform>
					</Rectangle>
				</Grid>
			</Grid>
		</Grid>

		<Grid Name="gridConnectionError" Visibility="Collapsed" Grid.ColumnSpan="2" Grid.RowSpan="2">
			<Rectangle Fill="#CCFFFFFF" />
			<TextBlock Text="There was a problem contacting the server" HorizontalAlignment="Center" VerticalAlignment="Center" />
		</Grid>
		
	</Grid>
	
</UserControl>
